<div class="content-auto">
<?php echo form_open('inventory/stockadd',array('class'=>'form-horizontal form-validate','id'=>'frm'));?>
<fieldset>
    <legend><h4><?php echo $title;?></h4></legend>
    <table class="table-form-submit">
        <tr>
            <td><label for="item">Item *</label></td>
            <td><input type="text" name="item" placeholder="item name" class="form-control" required /></td>
        </tr>
         <tr>
            <td><label for="code">Code</label></td>
            <td><input type="text" name="code" placeholder="code item" class="form-control control-width" /></td>
        </tr>
         <tr>
            <td><label for="unit">Unit *</label></td>
            <td><input type="text" name="unit" placeholder="number of items" class="form-control control-width" required /></td>
        </tr>
        <tr>
            <td><label for="cpu">Cost Per Unit *</td>
            <td><input type="text" name="cpu" placeholder="cost per unit" class="form-control control-width" required /></td>
        </tr>
        <tr>
            <td><label for="category_id">Category</label></td>
            <td>
                <?php echo form_dropdown('category_id', $categoryList,array(), 'class="form-control category-select"') ?>
            </td>
        </tr>
        <tr class="hidden-tr">
            <td><label class="print-hidden" for="type_id">Print Type *</label></td>
            <td>
                <?php echo form_dropdown('type_id', $printList,array(), 'class="form-control contract-hidden print-select" required') ?>
            </td>
        </tr>
        <tr class="hidden-contract-tr">
            <td><label class="contract-hidden" for="contracttype_id">Contract Type *</label></td>
            <td>
                <?php echo form_dropdown('contracttype_id', $contractList,array(), 'class="form-control contract-hidden contract-select" required') ?>
            </td>
        </tr>
        <tr class="hidden-tr ref-no-tr">
            <td><label class="print-hidden ref-no" for="ref">Referent No</label></td>
            <td>
            <?php echo '<span class="print-hidden ref-no ref-span">([OR Ref next]:'.$maxRefOR.', [DV Ref next]:'.$maxRefDV.')</span>' ?>
                <input data-or="<?php echo $maxRefOR; ?>" data-dv="<?php echo $maxRefDV; ?>" type="text" name="ref" placeholder="Enter referent number for the item" value="<?php echo $maxRefOR; ?>" class="form-control print-hidden ref-no" />
            </td>
        </tr>
        <tr>
            <td><label for="datepurchased">Purchased Date *</td>
            <td><input type="text" name="datepurchased" placeholder="purchased date" data-date-format="yyyy/mm/dd" class="form-control datepicker" required /></td>
        </tr>
        <tr class="hidden-tr">
            <td><label class="print-hidden" for="dateprinted">Printed Date</td>
            <td><input type="text" name="dateprinted" placeholder="printed date" data-date-format="yyyy/mm/dd" class="form-control print-hidden datepicker" /></td>
        </tr>
        <tr>
            <td><label for="status_id">Status</label></td>
            <td>
                <?php echo form_dropdown('status_id', $statusList,array(), 'class="form-control status-select"') ?>
            </td>
        </tr>
        <tr class="hidden-branch-tr">
            <td><label  class="branch-hidden" for="dateused">Used Date </td>
            <td><input type="text" name="dateused" placeholder="used date" data-date-format="yyyy/mm/dd" class="form-control branch-hidden datepicker" /></td>
        </tr>
        <tr class="hidden-branch-tr">
            <td><label  class="branch-hidden" for="branch_id">Branch *</label></td>
            <td>
                <?php echo form_dropdown('branch_id', $branchList,array(), 'class="form-control branch-hidden" required') ?>
            </td>
        </tr>
        <tr>
            <td><label for="remark">Remark</td>
            <td><textarea name="remark" class="form-control"></textarea></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <label class="checkbox">
                    <input name="activate" type="checkbox" checked="checked" /> Active
                </label>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <?php echo $form; ?>
            </td>
        </tr>
    </table>
 </fieldset> 
<?php echo form_close();?>
</div>